// 1.引入基础模块
import {
    createRouter,
    createWebHashHistory
} from "vue-router"

// 2.配置路由规范
const routes = [{
    path: "/register",
    component: () => import("../views/register.vue")
}, {
    path: "/login",
    component: () => import("../views/login.vue")
}, {
    path: "/index",
    component: () => import("../views/index.vue")
}, {
    path: "/setup",
    component: () => import("../views/setup.vue")
}, {
    path: "/channel",
    component: () => import("../views/channel.vue")
},
{
    path:'/',
    component:()=>import('../views/father.vue'),
    children:[
    {path:"/collect" ,
    component:()=>import('../views/user/collect.vue')
    },
    {path:"/develop" ,
    component:()=>import('../views/user/develop.vue')
    }
    ]
}
]


// 3.根据路由规则创建路由信息并导出
export default createRouter({
    routes, //路由规范
    history: createWebHashHistory() //路由模式
})